package com.waibao.demo.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class HelloController {

    /**
     * ${}可以取环境变量值，只是取值
     * #{}字符串做双引号，数值不加
     */
//    @Value("${neu.teacher}")
//    private Teacher teacher;


    @RequestMapping("/hello")
    @ResponseBody//json格式返回
    public String hello(){
        return "Hello, Spring Boot!\n";
    }
}
